home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-06-05 | 1.8 KB | 101 lines | [TEXT/ttxt] |
- **************************************************************************
- * This macro file shows some of the new features of the macro language *
- * You need MComp version 1.0D0 or later to compile this file. *
- * Written : 05.01.86 Matthias Aebi *
- * Last modification : 04.06.86 Matthias Aebi *
- **************************************************************************
-
- * 1
- * the shortcuts should be in a second window just behind the text window
- "Glossary/G" {
- Select(L.,C<|L.,C>);
- Push;
- Set($0,$S);
-
- Window(2);
- Select(0,0);
- Find($0);
-
- If NOT C: = 0 {
- Select(L.,C:+1|L.,C$);
- Copy;
- Window(1);
- Pop;
- Paste;
- }
- Else {
- Window(1);
- Pop;
- Select(L:,C:);
- };
- };
-
- * 2
- "Var test" {
- Set(#0, 3);
- Set(#3, -999);
- Prompt("Is it -999 ?", #(#0));
- };
-
- * 3
- "prev Word/1" {
- Select(L.,C.-1);
- Select(L.,C<);
- Select(L.,C. | L.,C>);
- };
-
- * 4
- "next Word/2" {
- If L$ > L. AND C: = C$ {
- Select(L.+1, 0);
- } Else {
- Select(L:,C:+1);
- };
- Select(L.,C>);
- Select(L.,C< | L.,C.);
- };
-
- * 5
- "current Word/3" {
- Select(L.,C< | L.,C>);
- };
-
- * 6
- "CmpTest/A" {
- prompt("String1",$1);
- prompt("String2",$2);
-
- set(#0, strcmp($1, $2, 1));
-
- insert("\n");
- insert($1);
-
- if #0 = 1 {
- insert(" > ");
- }
- else {
- if #0 = 0 {
- insert(" = ");
- }
- else {
- if #0 = -1 {
- insert(" < ");
- }
- else {
- insert(" ? ");
- };
- };
- };
-
- insert($2);
- };
-
- * 7
- "Window test/W" {
- PROMPT("Window number", #0);
- IF WINDOW(#0)
- PROMPT("Window exists", $0)
- ELSE
- PROMPT("Window does not exist", $0);
- }.
-